package com.sl.ms.trade.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sl.ms.trade.entity.TradingEntity;
import com.sl.ms.trade.enums.TradingStateEnum;
import com.sl.ms.trade.mapper.TradingMapper;
import com.sl.ms.trade.service.TradingService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wjh
 * @create 2023-09-22 13:39
 */
@Service
public class TradingServiceImpl extends ServiceImpl<TradingMapper, TradingEntity> implements TradingService {
    @Override
    public TradingEntity findTradByTradingOrderNo(Long tradingOrderNo) {
        return super.getOne(Wrappers.<TradingEntity>lambdaQuery().eq(TradingEntity::getTradingOrderNo,tradingOrderNo));
    }

    @Override
    public TradingEntity findTradByProductOrderNo(Long productOrderNo) {
        return super.getOne(Wrappers.<TradingEntity>lambdaQuery().eq(TradingEntity::getProductOrderNo,productOrderNo));
    }

    @Override
    public List<TradingEntity> findListByTradingState(TradingStateEnum tradingState, Integer count) {
        return null;
    }
}
